Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Native reader replacement and executor synchronization require ROS/Fast DDS runtime validation of the spin(-1) crash regression, but native tests could not be run in this review environment.
No open issues 🎉
What changed in this PR
This PR addresses #1691 by synchronizing subscription content-filter changes with the executor to prevent native crashes during spinning, without stopping the node or changing the public API.
Changes:
- Reuse the executor interrupt and wait-set write lock for filter updates and clears.
- Consolidate native filter-option cleanup, including failed updates, and replace manual parameter allocation with vectors.
- Remove stop/restart workarounds from tests and add an isolated
spin(-1)regression covering repeated updates, clears, and subsequent message delivery.
| File | Description |
|---|---|
test/test-subscription-content-filter.js |
Tests filter changes without stopping and adds infinite-spin regression coverage. |
src/shadow_node.h |
Exposes the executor to native subscription bindings. |
src/rcl_subscription_bindings.cpp |
Routes filter changes through the executor and consolidates option cleanup. |
src/handle_manager.h |
Declares the reusable wait-set write-lock operation. |
src/handle_manager.cpp |
Extracts interrupt-and-lock synchronization into a shared helper. |
src/executor.h |
Declares synchronized subscription filter updates. |
src/executor.cpp |
Applies filter changes under the wait-set write lock. |
lib/subscription.js |
Passes the owning node to native filter-update and clear calls. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The native executor/DDS synchronization changes need runtime validation because the spin(-1) regression could not run in this review environment, leaving reader-replacement safety and deadlock risks unverified.
No open issues 🎉
Review effort: Balanced
e309bbb to
267f5b5
Compare
Setting or clearing a content filter while spinning can replace the Fast DDS reader while
rcl_wait()is still using it, causing a native crash.spin(-1)regression that checks message delivery after repeated updates and clears.Fix: #1691